package cn.bjc.block;

import cn.bjc.domain.User;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.PathVariable;

public class UserBlock {

    //注意:必须是静态方法 加static
    public static User blockMethodsGetById(@PathVariable("id") Long id, BlockException e){
        e.printStackTrace();
        return new User(-1L,"调用降级方法类触发限流", "触发限流!");

    }
}
